﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QuanLyNhaHang.GUI.OrderOption
{
    public partial class NewTable : Form
    {
        Bussiness.BusNewTable bus;
        String tableTaget = null;
        GUI.Order fOrder = null;

        public NewTable(String s,GUI.Order f2)
        {
            tableTaget = s;
            fOrder = f2;
            InitializeComponent();
        }

        private void NewTable_Load(object sender, EventArgs e)
        {
            bus = new Bussiness.BusNewTable(this);
            bus.loadCombo();
            cboKV.SelectedValue = tableTaget;
            //cboKV.SelectedText = tableTaget;
            lblInfo.Text = "";
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (bus.newTable())
            {
                this.fOrder.loadLeftTable();
                txtTenBan.Text = "";
            };
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
